﻿<?php
$inc_lib = realpath(dirname(__FILE__) . '/../teia.lib/inc/inc_core.inc');
require_once $inc_lib;
use teia\webdev\php\core as teia;

$inc_cust = realpath(dirname(__FILE__) . '/../teia.cust/inc/inc_cust.inc');
require_once $inc_cust;
use teia\webdev\php\cust as cust;

$result = teia\SessionWrapper::start();

if (!$result) {
	echo "Session Error: Failed to start session\n";
}
?>

<!DOCTYPE html>
<html>
	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
		<title>Compra</title>
		<link href="/style/layout.css" rel="stylesheet" type="text/css">
		<link href="/style/style01.css" rel="stylesheet" type="text/css">
		<link href="/style/style_compra.css" rel="stylesheet" type="text/css">
		<link href="/style/stars.css" rel="stylesheet" type="text/css">
		<link href="/style/style_thumbnail_scroll.css" rel="stylesheet" type="text/css">
		<link rel="/style/stylesheet" href="form.css" type="text/css" media="screen">
		<?php teia\FunctionPool::include_jquery(); ?>

		<!--link rel="stylesheet" href="jquery-ui-1.8.16/themes/base/jquery.ui.all.css"-->
		<!--
		<link rel="stylesheet"   href="../library/css/jquery-ui-1.7.2.custom.css" type="text/css" media="screen">  
		<script type="text/jscript" src="../library/jquery-ui-1.8.16/jquery-1.6.2.js"></script>
		<script type="text/jscript" src="../library/jquery-ui-1.8.16/ui/jquery.ui.widget.js"></script>
		<script type="text/jscript"  src="../library/jquery-ui-1.8.16/ui/jquery.ui.tabs.js"></script>
		<script type="text/javascript" src="/scriptscript_comment.js"></script>
		-->
		<script type="text/javascript">
			$(function() {
				$( "#tabs" ).tabs({
					event: "mouseover"
				});
			});
		</script>
	</head>
	<body>
		<div align="center" style="position: absolute; margin-left: inherit; margin-right: inherit">
			<!-- Display header logo -->
			<?php cust\CustFunctions::display_header_logo(); ?>
			<!-- Display top navigation -->
			<?php cust\CustFunctions::display_top_nav(); ?>
			<!-- Display menu -->
			<?php cust\CustFunctions::display_menu(); ?>

		<div id="container">
			
		<div id="position1"> 
		</div>
		<div id="image_loader">
		<div id="image_frame">
	 	</div>

		<div id="discription_frame" class="auto-style1">	
	<h3> Price</h3>
	<h3> Nome do producto </h3>
	 <p> Cor: <select>
	 	<option>Vermelho</option>
		<option>Azul</option>
		<option>Verde</option>
		<option>Amarelo</option>
		<option>Rosa</option>
		<option>Castanho</option>
		<option>Preto</option>			 
	 </select></p>
	 <p> Tamanho: <select>
	 	<option>27</option>
		<option>28</option>
		<option>32</option>
		<option>37</option>
		<option>40</option>
		<option>45</option>
		<option>46</option>			 
	 </select></p>
	  <form action="">
        <div class="stars">
          <label for="rating-1"><input id="rating-1" name="rating" type="radio" value="1">0.5 Stars</label>
          <label for="rating-2"><input id="rating-2" name="rating" type="radio" value="2">1 Star</label>
          <label for="rating-3"><input id="rating-3" name="rating" type="radio" value="3">1.5 Stars</label>
          <label for="rating-4"><input id="rating-4" name="rating" type="radio" value="4">2 Stars</label>
          <label for="rating-5"><input id="rating-5" name="rating" type="radio" value="5">2.5 Stars</label>
          <label for="rating-6"><input id="rating-6" name="rating" type="radio" value="6">3 Stars</label>
          <label for="rating-7"><input id="rating-7" name="rating" type="radio" value="7">3.5 Stars</label>
          <label for="rating-8"><input id="rating-8" name="rating" type="radio" value="8">4 Stars</label>
        </div>
        <div>
          <!--input type="submit" value="Enviar"-->
      	</div>
      </form>

	 <a href="#">
	  adicione ao carrinho
	 <img src="../image/shopping_cart_icon.gif" alt="adicione este producto ao carrinho">
	 
	</a>
	

	</div>
	

		<div id="product_discription">
	
			<div id="tabs">
				<ul>
					<li><a href="#tabs-1">Descrição</a></li>
					<li><a href="#tabs-2">Detalhes Tecnicos</a></li>
					<li><a href="#tabs-3">Outros</a></li>
				</ul>
				<div id="tabs-1">
					<p> aqui sera carregado a descrição do producto a ser comprado</p>
				</div>
				<div id="tabs-2">
					<p>Aqui sera colocado outros detalhes tecnio.</p>
				</div>
				<div id="tabs-3">
					<p> ainda outros dados.</p>
					<p> e muitos outros.</p>
				</div>
			</div> <!-- end tabs-->
			
			</div> <!-- end product_discription--->
		 </div> <!-- end image_loader-->
		 
		 <div id="image_similar">	
	 <div id="photos">
        <div id="photos_inner">
	 <?php # this dinamically generate the similar item
	   
	   # this array contain the thumbnail images. Here you should have some DB call 
		 $thumbnail = array (1 => '1301088192_IMG_0388.jpg',
		'1301088373_IMG_0396.jpg', '1301088492_IMG_0373.jpg', '1301088807_IMG_0373.jpg', '1301088892_IMG_0311.jpg',
	 	'1301088930_IMG_0312.jpg', '1301088971_IMG_0319.jpg', '1301089074_IMG_0330.jpg', '1301089542_IMG_0335.jpg',
		'1301089698_IMG_0359.jpg', '1301089736_IMG_0352.jpg', '1301089783_IMG_0361.jpg');
		
		 # this array contain the  prices of the item in thumbnail images. Here you should have some DB call 
		 $price = array (1 => '100USD',
		'100USD', '100USD', '100USD', '100USD',
	 	'100USD', '100USD', '100USD', '100USD',
		'100USD', '100USD', '100USD');
		
		 # this array contain the  the names of the item in thumbnail images. Here you should have some DB call 
		 $name = array (1 => 'Hugo',
		'Boss', 'Hugo', 'Boss', 'Nike',
	 	'Nike', 'Puma', 'Hugo', 'Boss',
		'Puma', 'Boss', 'Boss');
		
		# this array contain the thumbnail images. Here you should have some DB call 
		 $ID = array (1 => '1301088192',
		'1301088373', '1301088492', '1301088807', '1301088892',
	 	'1301088930', '1301088971', '1301089074', '1301089542',
		'1301089698', '1301089736', '1301089783');

		 
	    
	     $current_selection=1;

		for ($counter=$current_selection; $counter<=10; $counter++) 
		{
		  echo "<div class=\"frame_similar\">		  
		  	<img src=\"../homem/thumbnail/$thumbnail[$counter]\" class=\"thumbnail_similar\">
		  	<a href=\"../compra/compra.php\" class=\"price_similar\">$price[$counter]</a>
		  </div> \n";

		}	 
	 
     ?> 
  </div> <!---photo inner----->
     </div> <!---photo ----->

	</div>
	
	<div id="comment">
		<div id="content">     
	      <form action="">
	        <div id="col1">
	        <div>
            <label for="name" >Nome:</label>
            <input name="name" id="name" type="text">
          </div>
          <div>
            <label for="email">Email:</label>
            <input name="email" id="email" type="text">
          </div>
	        </div>
	        <div id="col2">
	         <div>
            <label for="comment-text">Comentário:</label>
            <textarea rows="10" cols="50" name="comment-text" id="comment-text"></textarea>
            </div> 
            <div>
          	<input type="submit" value="Submit">
        	</div>
  
	        
	        </div>

	         
	      </form>
	   </div> <!--content-->

	
	</div>



 </div>   <!--end container-->

	<?php cust\CustFunctions::display_footer();?>				
</div> <!-- end -->

		<script type="text/javascript" src="/script/script.js"></script>
		<script type="text/javascript" src="/scrip/script_thumbnail_scroll.js"></script>
		<script type="text/javascript" src="/script/autoadvance.js"></script>
	</body>
</html>
